package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmJiSuLeiMapper;
import com.ruoyi.web.tdm.domain.TdmJiSuLei;
import com.ruoyi.web.tdm.service.ITdmJiSuLeiService;

/**
 * ID-05 -21 -310 激素类药物Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmJiSuLeiServiceImpl implements ITdmJiSuLeiService 
{
    @Autowired
    private TdmJiSuLeiMapper tdmJiSuLeiMapper;

    /**
     * 查询ID-05 -21 -310 激素类药物
     * 
     * @param id ID-05 -21 -310 激素类药物主键
     * @return ID-05 -21 -310 激素类药物
     */
    @Override
    public TdmJiSuLei selectTdmJiSuLeiById(Long id)
    {
        return tdmJiSuLeiMapper.selectTdmJiSuLeiById(id);
    }

    /**
     * 查询ID-05 -21 -310 激素类药物列表
     * 
     * @param tdmJiSuLei ID-05 -21 -310 激素类药物
     * @return ID-05 -21 -310 激素类药物
     */
    @Override
    public List<TdmJiSuLei> selectTdmJiSuLeiList(TdmJiSuLei tdmJiSuLei)
    {
        return tdmJiSuLeiMapper.selectTdmJiSuLeiList(tdmJiSuLei);
    }

    /**
     * 新增ID-05 -21 -310 激素类药物
     * 
     * @param tdmJiSuLei ID-05 -21 -310 激素类药物
     * @return 结果
     */
    @Override
    public int insertTdmJiSuLei(TdmJiSuLei tdmJiSuLei)
    {
        tdmJiSuLei.setCreateTime(DateUtils.getNowDate());
        return tdmJiSuLeiMapper.insertTdmJiSuLei(tdmJiSuLei);
    }

    /**
     * 修改ID-05 -21 -310 激素类药物
     * 
     * @param tdmJiSuLei ID-05 -21 -310 激素类药物
     * @return 结果
     */
    @Override
    public int updateTdmJiSuLei(TdmJiSuLei tdmJiSuLei)
    {
        tdmJiSuLei.setUpdateTime(DateUtils.getNowDate());
        return tdmJiSuLeiMapper.updateTdmJiSuLei(tdmJiSuLei);
    }

    /**
     * 批量删除ID-05 -21 -310 激素类药物
     * 
     * @param ids 需要删除的ID-05 -21 -310 激素类药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmJiSuLeiByIds(Long[] ids)
    {
        return tdmJiSuLeiMapper.deleteTdmJiSuLeiByIds(ids);
    }

    /**
     * 删除ID-05 -21 -310 激素类药物信息
     * 
     * @param id ID-05 -21 -310 激素类药物主键
     * @return 结果
     */
    @Override
    public int deleteTdmJiSuLeiById(Long id)
    {
        return tdmJiSuLeiMapper.deleteTdmJiSuLeiById(id);
    }
}
